bin_PROGRAMS=affinity
libexec_PROGRAMS = affinity-applet

AM_CFLAGS = $(DEPS_CFLAGS)              \
            $(GCC_FLAGS)                \
            -D_GNU_SOURCE               \
            -DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \
            -DACTIONDIR=\""$(datadir)/affinity/actions"\"  \
            -DDATADIR=\""$(datadir)"\"			\
            $(TRACKER_CFLAGS)           \
            $(BEAGLE_CFLAGS)       	\
            $(APPLET_CFLAGS)     

AFF_SOURCES = 	\
	affinity.c      		\
	affinity.h	        	\
	aff-button.c	        	\
	aff-button.h	        	\
	aff-results.c	        	\
	aff-results.h	        	\
	aff-search-engine.c             \
	aff-search-engine.h             \
	aff-search-engine-actions.c     \
	aff-search-engine-actions.h     \
	aff-search-engine-apps.c        \
	aff-search-engine-apps.h        \
	aff-settings.c	        	\
	aff-settings.h		        \
	aff-sidebar.c		        \
	aff-sidebar.h		        \
	aff-start.c		        \
	aff-start.h		        \
	aff-utils.c                     \
	aff-utils.h                     \
	aff-window.c		        \
	aff-window.h			\
	eggaccelerators.c		\
	eggaccelerators.h		\
	tomboykeybinder.c		\
	tomboykeybinder.h			

affinity_LDADD  = $(DEPS_LIBS) $(BEAGLE_LIBS) $(TRACKER_LIBS)

affinity_SOURCES = 	\
	main.c

affinity_SOURCES += $(AFF_SOURCES)			

if HAVE_APPLET
affinity_applet_LDADD  = $(DEPS_LIBS) $(APPLET_LIBS) $(BEAGLE_LIBS) $(TRACKER_LIBS) 

affinity_applet_SOURCES = 	\
	applet.c		\
	applet-button.c		\
	applet-button.h

affinity_applet_SOURCES += $(AFF_SOURCES)	
endif

BEAGLE_SOURCES = \
	aff-search-engine-beagle.c \
	aff-search-engine-beagle.h

if HAVE_BEAGLE
affinity_SOURCES += $(BEAGLE_SOURCES)
if HAVE_APPLET
affinity_applet_SOURCES += $(BEAGLE_SOURCES)
endif
endif

TRACKER_SOURCES = \
	aff-search-engine-tracker.c \
	aff-search-engine-tracker.h

if HAVE_TRACKER
affinity_SOURCES += $(TRACKER_SOURCES)
if HAVE_APPLET
affinity_applet_SOURCES += $(TRACKER_SOURCES)
endif
endif
	

MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing

snapshot:
	$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`

